home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-12-17 | 3.4 KB | 150 lines | [TEXT/MPS ] |
- /*--------------------------------------------------------------------
-
- Rotate.r - Resources for Rotate Bitmaps
-
- ---------------------------------------------------------------------*/
-
- #include "Types.r"
- #include "Rotate.h"
-
- /* These define's are used in the MENU resources to disable specific
- menu items. */
- #define AllItems 0x7FFFFFFF /* 31 flags */
- #define MenuItem2 0x0002
- #define MenuItem4 0x0008
-
-
- resource 'ALRT' (rMsg, "Message", purgeable) {
- {kAlertTop,KAlertLeft,kAlertTop+kMsgHeight,KAlertLeft+kMsgWidth},
- rMsg, {
- OK, visible, silent;
- OK, visible, silent;
- OK, visible, silent;
- OK, visible, silent
- };
- };
-
- resource 'DITL' (rMsg, "Message", purgeable) {
- {
- {kMsgButtonTop, kMsgOkLeft, kMsgButtonBottom, kMsgOkRight},
- Button {enabled,"Continue"},
- {kMsgTextTop, kMsgTextLeft, kMsgTextBottom, kMsgTextRight},
- StaticText {disabled,"^0"}
- }
- };
-
- resource 'ALRT' (rAlert, "Error Alert", purgeable) {
- {kAlertTop,KAlertLeft,kAlertTop+kAlertHeight,KAlertLeft+kAlertWidth},
- rAlert, {
- OK, visible, silent;
- OK, visible, silent;
- OK, visible, silent;
- OK, visible, silent
- };
- };
-
- resource 'DITL' (rAlert, "Error Alert", purgeable) {
- {
- {kAlertButtonTop, kAlertOkLeft, kAlertButtonBottom, kAlertOkRight},
- Button {enabled,"OK"},
- {kAlertIconTop, kAlertIconLeft, kAlertIconBottom, kAlertIconRight},
- Icon {disabled,0},
- {kAlertTextTop, kAlertTextLeft, kAlertTextBottom, kAlertTextRight},
- StaticText {disabled,"^0"}
- }
- };
-
- resource 'STR#' (rTextStr,"Text Strings") {
- {
- "Rotate a Bitmap\n\n"
- " Version 0.9\n"
- " © 1989 Bob Spence\n"
- " All rights reserved\n\n"
- "Source Language: MPW C",
-
- "Sorry, can't find the Bell file\n"
- " or the Bell 'Pict' resource.",
- }
- };
-
- /* we use an MBAR resource to conveniently load all the menus */
-
- resource 'MBAR' (rMenuBar, preload) {
- { mApple, mFile, mImage, mRotate }; /* four menus */
- };
-
- resource 'MENU' (mApple, "Apple", preload) {
- mApple, textMenuProc,
- AllItems & ~MenuItem2, /* Disable item #2 */
- enabled, apple,
- {
- "About Rotate…",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mFile, "File", preload) {
- mFile, textMenuProc,
- AllItems & ~MenuItem2, /* Disable item #2 */
- enabled, "File",
- {
- "Quit",
- noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mImage, "Image", preload) {
- mImage, textMenuProc,
- AllItems & ~(MenuItem4), /* Disable item #4 */
- enabled, "Image",
- {
- "Garbage bits",
- noicon, nokey, nomark, plain;
- "Black",
- noicon, nokey, nomark, plain;
- "White",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Bell",
- noicon, "B", nomark, plain;
- "Stretch Bell",
- noicon, "S", nomark, plain
- }
- };
-
- resource 'MENU' (mRotate, "Rotate", preload) {
- mRotate, textMenuProc,
- AllItems & ~(MenuItem2), /* Disable item #2 */
- enabled, "Rotate",
- {
- "All Rotations",
- noicon, "A", nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Null Rotation",
- noicon, nokey, nomark, plain;
- "Horizontal",
- noicon, nokey, nomark, plain;
- "Vertical",
- noicon, nokey, nomark, plain;
- "Flip 180",
- noicon, nokey, nomark, plain;
- "Left",
- noicon, nokey, nomark, plain;
- "Right",
- noicon, nokey, nomark, plain;
- "Flip Left",
- noicon, nokey, nomark, plain;
- "Flip Right",
- noicon, nokey, nomark, plain
- }
- };
-
- resource 'WIND' (128, preload, purgeable) {
- {kWindowBase, 0, kWindowBase+kWindowHeight, kWindowWidth},
- noGrowDocProc, visible, noGoAway, 0x0, "Rotate a Bitmap"
- };
-